package org.NooLab.itexx.app.gui.handlers;

import java.awt.Component;

import org.NooLab.itexx.app.gui.definition.ITexxWindowGui;



public class ScrollPaneScrollEvent implements ScrollEventObserverIntf{

	ITexxWindowGui windowGui;
	
	public ScrollPaneScrollEvent(ITexxWindowGui windowGui) {
		// 
		windowGui.setScrollEventObserver( (ScrollEventObserverIntf)this);
		this.windowGui = windowGui;
	}

	@Override
	public void setValue(int value) {
		// 
		int n;
		Component[] ccs; 
		          
		windowGui.getScrollPaneReturnedResults().validate();
		windowGui.getScrollPaneReturnedResults().repaint();
		
		ccs = windowGui.getScrollPaneReturnedResults().getComponents();
		n = ccs.length;
		for (int i=0;i<n;i++){
			ccs[i].repaint() ;
		}
	}

}
